x86: replace nr_irqs sized per-domain arrays with radix trees
authorJan Beulich <jbeulich@novell.com>
Mon, 9 May 2011 08:27:42 +0000 (09:27 +0100)
committerJan Beulich <jbeulich@novell.com>
Mon, 9 May 2011 08:27:42 +0000 (09:27 +0100)
commit30d61f33084210362ac1efb2b72af547da70b1cc
tree8e175fa49fb18613a6c252bfad90e87f4c2b139d
parent8dc6738dbb3c6117fb7e30617609f6d41e19d3b4
x86: replace nr_irqs sized per-domain arrays with radix trees

It would seem possible to fold the two trees into one (making e.g. the
emuirq bits stored in the upper half of the pointer), but I'm not
certain that's worth it as it would make deletion of entries more
cumbersome. Unless pirq-s and emuirq-s were mutually exclusive...

v2: Split setup/teardown into two stages - (de-)allocation (tree node
(de-)population) is done with just d->event_lock held (and hence
interrupts enabled), while actual insertion/removal of translation
data gets done with irq_desc's lock held (and interrupts disabled).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Fix up for new radix-tree implementation. In particular, we should
never insert NULL into a radix tree, as that means empty slot (which
can be reclaimed during a deletion). Make use of
radix_tree_int_to_ptr() (and its inverse) to hide some of these
details.

Signed-off-by: Keir Fraser <keir@xen.org>
xen/arch/x86/domain.c
xen/arch/x86/irq.c
xen/include/asm-x86/domain.h
xen/include/asm-x86/hvm/domain.h
xen/include/asm-x86/irq.h